package com.yang.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@ApiModel("账单表")
@TableName("bill")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class Bill {

    @TableId
    @ApiModelProperty("账单id")
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("账单时间")
    private LocalDateTime date;

    @ApiModelProperty("账单所属分类id")
    private Long categoryId;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("当前账单收入")
    private Float income;

    @ApiModelProperty("当前账单支出")
    private Float expenditure;

    @ApiModelProperty("账单所属用户id")
    private Long userId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

}
